home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-serious-
/
misc
/
trekkie
/
installtrekkie
next >
Wrap
Text File
|
1999-09-06
|
6KB
|
276 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Install Trekkie Version 2
;;;
;;; $VER: Install_Trekkie 1.03 (14 August 1999)
;;;
;;; Copyright © 1998 Stefan Osterburg, Brandenburg Germany
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(set ProgramName "Trekkie - The Star Trek database");
(set ProgramBaseName "Trekkie")
(set VersionNum "2.16")
(set @default-src "Trekkie/")
(set @fonts-src "Trekkie/fonts")
(complete 0)
(set #ask-where "Where do you want to install/update Trekkie?\n(No directory will be created there.)"
)
(procedure copyfont
(
(working "Checking/Copying Fonts")
(
if (= (exists "fonts:trekkie.font") 0)
(copyfiles (prompt "Copy trekkie.font to FONTS:") (help "")
(source @fonts-src)
(dest "fonts:")
(choices "trekkie.font")
(confirm))
)
(if (= (exists "fonts:trekkie/9f") 0)
(
(makedir "fonts:trekkie")
(copyfiles (prompt "Copy trekkie.font to FONTS:") (help "")
(source @fonts-src)
(dest "fonts:trekkie")
(choices "trekkie/9f")
(confirm))
)
)
)
)
(set @default-dest
(askdir (prompt #ask-where) (help @askdir-help) (default @default-dest)))
(
if (exists "Trekkie.lzx")
(
(working "Unpacking files...")
(set @default-src "T:Trekkie")
(set @fonts-src "T:Trekkie/fonts")
(run "unlzx -m x Trekkie.lzx #? T:"
(help "No help available.")
(prompt "Unpack files")
TRUE
)
)
)
(complete 30)
(
if (= (exists "fonts:xen.font") 0)
(
if (= (exists "fonts:xen/8") 0)
(copyfont)
)
(
if (exists "fonts:trekkie.font")
(
(set #con
(askbool
(prompt "Since you have the XEN font, you won't need Trekkie.font\nthat was found in your FONTS: directory.\nDo you want to delete it?")
(help "")
(default 1)
)
)
(if #con
(
(delete "fonts:trekkie.font"
(prompt "Delete Trekkie.font")
(help "")
(confirm))
(delete "fonts:trekkie/9f"
(prompt "Delete fonts:trekkie/9f")
(help "")
(confirm))
(delete "fonts:trekkie"
(prompt "Delete fonts:Trekkie")
(help "")
(confirm))
))
)
)
)
(complete 35)
(working "Copying files...")
(set versnumalt (getversion (tackon @default-dest "Trekkie")))
(set versalt (/ versnumalt 65536))
(set revalt (- versnumalt (* versalt 65536)))
(set versnumneu (getversion (tackon @default-src "Trekkie")))
(set versneu (/ versnumneu 65536))
(set revneu (- versnumneu (* versneu 65536)))
(if (= versnumalt 0)
(
copyfiles
(prompt "Copy Trekkie executable")
(help "")
(source @default-src)
(dest @default-dest)
(choices "Trekkie")
(confirm)
)
(if (< versnumalt versnumneu)
(
copyfiles
(prompt "Update Trekkie executable\n" "Existing version: " versalt "." revalt ", Version to install: " versneu "." revneu)
(help "")
(source @default-src)
(dest @default-dest)
(choices "Trekkie")
(confirm)
)
)
)
(complete 45)
(if (= (exists (tackon @default-dest "Trekkie.info")) 0)
(
copyfiles
(prompt "Copy Trekkie program icon")
(help "")
(source @default-src)
(dest @default-dest)
(choices "Trekkie.info")
(confirm)
))
(complete 48)
(if (= (exists (tackon @default-dest "default.msk")) 0)
(
copyfiles
(prompt "Copy settings file")
(help "")
(source @default-src)
(dest @default-dest)
(choices "default.msk")
(confirm)
))
(complete 51)
(if (= (exists (tackon @default-dest "default.srt")) 0)
(
copyfiles
(prompt "Copy settings file")
(help "")
(source @default-src)
(dest @default-dest)
(choices "default.srt")
(confirm)
))
(complete 54)
(if (= (exists (tackon @default-dest "default.sel")) 0)
(
copyfiles
(prompt "Copy settings file")
(help "")
(source @default-src)
(dest @default-dest)
(choices "default.sel")
(confirm)
))
(complete 57)
(if (= (exists (tackon @default-dest "default.prt")) 0)
(
copyfiles
(help "")
(prompt "Copy settings file")
(source @default-src)
(dest @default-dest)
(choices "default.prt")
(confirm)
))
(complete 60)
(set versnumalt 0)
(set versnumalt (getversion (tackon @default-dest "Trekkie.guide")))
(set versalt (/ versnumalt 65536))
(set revalt (- versnumalt (* versalt 65536)))
(set versnumneu 0)
(set versnumneu (getversion ("Trekkie.guide")))
(set versneu (/ versnumneu 65536))
(set revneu (- versnumneu (* versneu 65536)))
(if (= versnumalt 0)
(
copyfiles
(prompt "Copy Amigaguide documentation")
(help "")
(source "")
(dest @default-dest)
(choices "Trekkie.guide")
(confirm)
(infos)
)
(if (< versnumalt versnumneu)
(
copyfiles
(prompt "Update Amigaguide documentation\n" "Existing version: " versalt "." revalt ", Version to install: " versneu "." revneu)
(help "")
(source "")
(dest @default-dest)
(choices "Trekkie.guide")
(confirm)
)
)
)
(complete 70)
(if (= (exists (tackon @default-dest "trek.dat")) 0)
(
if (exists (tackon @default-src "trek.dat"))
(copyfiles
(prompt "Copy data file")
(help "")
(source @default-src)
(dest @default-dest)
(choices "trek.dat")
(confirm))
)
(
if (exists (tackon @default-src "trek.dat"))
(
(set #backnum 0)
(set #backupname (cat (tackon @default-dest "trek.bak") #backnum ".dat"))
(while (exists #backupname)
(
(set #backnum (+ #backnum 1))
(set #backupname (cat (tackon @default-dest "trek.bak") #backnum ".dat"))
)
)
(rename (tackon @default-dest "trek.dat") #backupname
(prompt "Backup existing trek.dat to" #backupname ".")
(help "")
(confirm)
)
(copyfiles
(prompt "Copy data file")
(help "")
(source @default-src)
(dest @default-dest)
(choices "trek.dat")
(confirm)
)
(message "\nThe trek.dat file that was found at the given destination\nwas backed up as " #backupname)
)
)
)
(complete 95)
(run "delete T:Trekkie/#? all" "delete T:Trekkie.info" "delete T:Trekkie"
(prompt "Tempory files have been created in your T: directory\nThey will now be deleted.")
(help "No help available")
)
(complete 100)